home *** CD-ROM | disk | FTP | other *** search
/ Champak 132 (Alt) / Vol 132.iso / games / 3d_hyper / 3d_hyper.dcr / Scripts_10_Tweak Car Frame.ls < prev    next >
Encoding:
Text File  |  2011-06-09  |  1.0 KB  |  54 lines

  1. property pPlaceToGo, pTimeLeaving, pReadyToGo
  2. global gHaveSound
  3.  
  4. on exitFrame me
  5.   exitKeysPressed()
  6.   if the shiftDown then
  7.     sendAllSprites(#keyWasPressed, #Shift, "Shift")
  8.   else
  9.     if the controlDown then
  10.       sendAllSprites(#keyWasPressed, #Control, "Control")
  11.     else
  12.       if the optionDown then
  13.         sendAllSprites(#keyWasPressed, #ALT, "Alt")
  14.       end if
  15.     end if
  16.   end if
  17.   if (the milliSeconds > pTimeLeaving) and (pTimeLeaving > 0) then
  18.     if pReadyToGo then
  19.       go(pPlaceToGo)
  20.     else
  21.       pReadyToGo = 1
  22.       go(the frame)
  23.     end if
  24.   else
  25.     go(the frame)
  26.   end if
  27. end
  28.  
  29. on beginMusic me
  30.   if gHaveSound then
  31.     sound(1).play(member("cracermusic"))
  32.     sound(1).volume = 120
  33.   end if
  34. end
  35.  
  36. on startPressed me
  37.   me.LeaveFrame("Load Course")
  38. end
  39.  
  40. on keyDown me
  41.   sendAllSprites(#keyWasPressed, the keyCode, the key)
  42. end
  43.  
  44. on LeaveFrame me, whichFrame
  45.   timeToLeave = 1500
  46.   sendAllSprites(#LeaveThisFrame, timeToLeave)
  47.   pPlaceToGo = whichFrame
  48.   pTimeLeaving = the milliSeconds + timeToLeave
  49. end
  50.  
  51. on beginSprite me
  52.   pTimeLeaving = 0
  53. end
  54.